"use strict";
const Router = require("koa-router");
const router = new Router();
const adminRoutes = require("./adminRoutes");
const apiRoutes = require("./apiRoutes");
const utils = require("../utils");
const fs = require("fs");
const AV = require("leanengine");

router.all("/", async function(ctx) {
  let ip = utils.getIpAdress();
  // 是否是生产
  ctx.state.isProd = ip === "172.27.0.13";
  ctx.state.adminRoutes = adminRoutes;
  ctx.state.apiRoutes = apiRoutes;
  await ctx.render("../views/index.ejs");
});

module.exports = router;
